package com.wang.crud.mapper;/*
*王浩政 
*whz
2022/9/2
11:55
*小米商城
*/

import com.wang.crud.pojo.User;
import com.wang.crud.pojo.UserDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface UserMapper {
    User findById(Long id);
    User findByUserNameAndPassword(@Param("name") String name, @Param("PASSWORD") String PASSWORD);
    User findByUserNameAndPasswordMap(Map paramMap);
    User findByUserNameAndPasswordMap2(@Param("map") Map paramMap);
    UserDto findByUserNameAndPasswordpojo(UserDto userDto);
    User findByUserNameAndPasswordpojo2(UserDto userDto);
    /*模糊查询，可能会返回多条，只要存在就可能要使用集合来接受 */
    List<User> findByEmailLike(String emailLike);
    List<User> findAll();
    int deleteByteId(Long userId);
    int updateUserById(User User);
    void addUser(User User);
    //void addUserAndGetId(User User);
}
